package com.otojob.mapper;

import com.otojob.entity.UserJob;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.otojob.entity.vo.ResumeListVO;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author TingFeng
 * @since 2022-03-18
 */
public interface UserJobMapper extends BaseMapper<UserJob> {
    /**
     * 工作id找投递用户id
     * @param jobId
     * @return
     */
    List<Integer> findUserIdByJobId(Integer jobId);
    /**
     * 通过投递用户id找工作id
     * @param userId
     * @return
     */
    List<Integer>  findJobIdByUserId(Integer userId);

    /**
     * 通过jobId查找简历
     * @param jobId
     * @return
     */
    List<ResumeListVO> findReceivedResumeList(Integer jobId);

    /**
     * 添加投递简历id
     */
    void sendResume(UserJob userJob);

    /**
     * 查询是否重复投递
     * @param userId
     * @param jobId
     * @return
     */
    Integer findSendResume(int userId, Integer jobId);


}
